import React, { Component } from 'react'
let { Provider, Consumer } = React.createContext();
export default class App extends Component {
  render() {
    return (
      <div>
        <Provider value={{num:879}}>
          <Consumer>{
            ({num}) => {
              return <span>{ num }</span>
            }} 
          </Consumer>
        </Provider>
      </div>
    )
  }
}
